#include<cstdio>

int main()
{
	int x;
	scanf("%d",&x);
	int x1,x2,x3,x4;
	x1=x/1000;
	x2=x/100%10;
	x3=x/10%10;
	x4=x%10;
	printf("%d,%d,%d,%d",x4,x3,x2,x1);
	return 0;
}
